<template>
  <div class="box">
    <div class="title">
      <router-link
        tag="img"
        :to="{ name: 'confirmOrder' }"
        src="https://axhub.im/pro/221031c5a692ef70/images/%E8%AE%A2%E5%8D%95%E7%A1%AE%E8%AE%A4/u52.png"
        alt=""
      />
      优惠券
    </div>
    <div class="ke">可用优惠券（1）</div>
    <div class="content">
        <div class="able">
            <p>￥5</p>
            <span>满50元可用</span>
        </div>
        <div class="tong">
            <p>通用</p>
            <span>有效期至：2020-12-12</span>
        </div>
        <van-checkbox v-model="checked" ></van-checkbox>
    </div>
    <router-link tag="div" to="./confirmOrder" class="confirm">确认</router-link>
  </div>
</template>

<script>
import Vue from 'vue';
import { Checkbox, CheckboxGroup } from 'vant';

Vue.use(Checkbox);
Vue.use(CheckboxGroup);


export default {
  data() {
    return {
      checked: false,
    };
  },
};
</script>

<style lang="scss" scoped>
.box {
  width: 375px;
  height: 667px;
  background: #f5f5f5;
  .title {
    width: 100%;
    height: 40px;
    border-bottom: 1px solid #e4e4e4;
    text-align: center;
    line-height: 40px;
    font-size: 16px;
    background: #fff;
    img {
      width: 30px;
      height: 30px;
      transform: rotate(90deg);
      float: left;
      margin: 6px 0 0 10px;
    }
  }
  .ke {
    width: 100%;
    height: 40px;
    line-height: 40px;
    background: #fff;
    font-size: 16px;
    text-indent: 10px;
  }
  .content{
      width: 344px;
      height: 100px;
      background: #fff;
      margin: 20px auto 0;
      position: relative;
      .able{
        width: 115px;
        height: 100px;
        background: #e4cd88;
        background: #ed0d0d;
        color: #fff;
        text-align: center;
        float: left;
        p{
            font-size: 30px;
            font-weight: bolder;
            line-height: 78px;
            height: 60px;
        }
        span{
            font-size: 14px;
        }
        .van-checkbox{
            margin-top: 100px;
        }
      }
      .tong{
          width: 170px;
          height: 110px;
          float: left;
          margin-left: 20px;
          p{
              color: #333333;
              font-size: 18px;
              font-weight: bolder;
              line-height: 65px;
              height: 60px;
          }
          span{
              font-size: 14px;
              color: #999;
          }
      }
      .van-checkbox{
        position: absolute;
        top:40px;
        right: 15px;
      }
  }
  .confirm{
    position: fixed;
    bottom: 20px;
    left: 28px;
    width: 300px;
    height: 38px;
    background: #ed0d0d;
    border-radius: 20px;
    color: #fff;
    text-align: center;
    font-size: 16px;
    line-height: 38px;
  }
}
</style>